<?php
namespace app\common\controller;

use app\common\model\admin\AdminParam;

class Param
{
	/**
	 * 获取参数
	 * @param int $user_id 会员ID
	 * @return array
	 */
	public static function getParam($user_id)
	{
		$param = AdminParam::where(['user_id' => $user_id , 'state' => 1])->find();
		$param = $param ? $param : AdminParam::where(['id' => 1])->find();
		return $param -> toArray();
	}
}